gdkseatdefault: Grab touch events where applicable
authorDaniel Boles <dboles@src.gnome.org>
Tue, 5 Sep 2017 14:44:00 +0000 (15:44 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Wed, 20 Sep 2017 18:19:35 +0000 (19:19 +0100)
commit9c7e996bceaecedd474481d00303d807dcd5410c
tree29e3bab751264a5936207bfe8ad1b80a41877816
parent761194dad7e532cabc627c35a38b80af015797b8
gdkseatdefault: Grab touch events where applicable

gdk_seat_default_grab() grabs POINTER_EVENTS if the capability is
GDK_SEAT_CAPABILITY_ALL_POINTING. But that enumerator is a union that
includes GDK_SEAT_CAPABILITY_TOUCH, but we never grabbed TOUCH_EVENTS,
an unused macro that was presumably created with this purpose in mind.

So, check which of the ALL_POINTING capabilities we have, and set the
right mask of POINTER_EVENTS and/or TOUCH_EVENTS as required.

As part of this, explicitly let TABLET_STYLUS take over pointer events,
as this is the intended behaviour and was the effective result before.

This should fix touch events being lost in migrating from Device.grab()
to Seat.grab(GDK_SEAT_CAPABILITY_ALL_POINTING), as found by Inkscape.

https://bugzilla.gnome.org/show_bug.cgi?id=781757
gdk/gdkseatdefault.c